package stringexercise;

public class TrimDemo {
    public static void main(String[] args) {
        String a="      hello    world      ";
        a=a.trim();//去除字符串两边的空格
        System.out.println(a);
    }
}
